using NHibernate.Criterion;

namespace FwkLight.Domain.Fetching
{
  public abstract class FetchingFilter : IFetchingFilter
  {
    protected FetchingFilter(string propertyName, object value, IFetchingPart parent)
    {
      Parent = parent;
      PropertyName = propertyName;
      Value = value;
    }

    public IFetchingPart Parent { get; private set; }

    public string PropertyName { get; private set; }
    public object Value { get; private set; }

    public abstract void ApplyFilterOn(DetachedCriteria detachedCriteria);
  }
}